package com.edu.bean;
/*
 * @Author:princess
 * @Date 2023/12/5 12 05 18:52
 *
 */

import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;

public class User {
    private int userId;
    @NotEmpty()
    @Length(min = 6,max = 10)
    private String username;
    @NotEmpty()
    @Length(min = 6,max = 10)
    private String password;

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public User() {
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
